home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / Clueless.swf / scripts / org / flintparticles / actions / Accelerate.as next >
Encoding:
Text File  |  2011-10-17  |  1010 b   |  48 lines

  1. package org.flintparticles.actions
  2. {
  3.    import org.flintparticles.emitters.Emitter;
  4.    import org.flintparticles.particles.Particle;
  5.    
  6.    public class Accelerate extends Action
  7.    {
  8.        
  9.       
  10.       private var _x:Number;
  11.       
  12.       private var _y:Number;
  13.       
  14.       public function Accelerate(param1:Number, param2:Number)
  15.       {
  16.          super();
  17.          _x = param1;
  18.          _y = param2;
  19.       }
  20.       
  21.       public function get y() : Number
  22.       {
  23.          return _y;
  24.       }
  25.       
  26.       override public function update(param1:Emitter, param2:Particle, param3:Number) : void
  27.       {
  28.          param2.velX += _x * param3;
  29.          param2.velY += _y * param3;
  30.       }
  31.       
  32.       public function set y(param1:Number) : void
  33.       {
  34.          _y = param1;
  35.       }
  36.       
  37.       public function set x(param1:Number) : void
  38.       {
  39.          _x = param1;
  40.       }
  41.       
  42.       public function get x() : Number
  43.       {
  44.          return _x;
  45.       }
  46.    }
  47. }
  48.